/*******************************************************************************
 *
 * Copyright (c) 2008-2011 ayound@gmail.com, guwei8576431@gmail.com
 * This program and the accompanying materials
 * are made available under the terms of the GNU GENERAL PUBLIC LICENSE 
 * which accompanies this distribution, and is available at
 * http://dev.perl.org/licenses/gpl1.html
 * All rights reserved.
 * 
 * Created on 2009-10-16
 *******************************************************************************/

package org.cgtw.scriptprofile.ui.manager;

import java.util.Properties;


/**
 * cache the config, include locale, port, browser etc.
 */
public class ConfigManager {
	private static ConfigManager instance = null;
	
	private Properties prop = null;
	
	private ConfigManager(){
		init();
	}
	
	public static ConfigManager getInstance(){
		if(instance == null){
			instance = new ConfigManager();
		}
		return instance;
	}
	
	public void reload(){
		instance = null;
	}
	
	private void init(){
		prop = new Properties();
	}
	
	public String getCacheValue(String key){
		return prop.getProperty(key);
	}

}
